public class Student {
    public String name;
    public  int age;
    public static  String classes = "113java";//班级  静态成员变量-》类变量  访问：类名.去访问

    public void print() {
        System.out.println("姓名："+ this.name+ " " + "年龄：" + this.age+ " " + "班级：" + classes);
    }
    public Student(String name,int age) {
        //两个参数的构造方法
        this.name = name;
        this.age =age;
    }

    public static void main(String[] args) {
        Student student1 = new Student("小丁",18);
        Student student2 = new Student("小花",3);
        Student student3 = new Student("小火",18);
        Student.classes = "火星村";//classes是静态成员变量 类名.去访问
        student1.print();
        student2.print();
        student3.print();
    }
}
//用static修饰成员变量或方法